/* import http from 'http'
http.createServer((req, res) => {
  res.statusCode = 404
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World\n');
  // res.end('a=1&b=2')
}).listen(8080,function(){
  console.log('启动成功')
}) */
import CreateServer from "./utils/createServer.js";
const app = new CreateServer()

app.static('/public')
app.static('/html')
app.get('/test/abc/:id', function (req, res) {
  console.log(JSON.stringify(req.params))
  console.log(JSON.stringify(req.query))
  res.end('abc')
})

app.get('/api', function (req, res) {
  res.end('ok')
})